<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>添加用户</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <style>
        .form-container {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
            padding: 30px;
            max-width: 600px;
            margin: 30px auto;
        }
        .header {
            background-color: #4e73df;
            color: white;
            padding: 15px 0;
            border-radius: 10px 10px 0 0;
            margin-bottom: 20px;
        }
    </style>
</head>
<body class="bg-light">
<div class="container">
    <div class="header text-center">
        <h2><i class="bi bi-person-plus"></i> 添加用户</h2>
    </div>

    <div class="form-container">
        <form action="${pageContext.request.contextPath}/users/add" method="post">
            <div class="mb-3">
                <label for="usernumber" class="form-label">账号</label>
                <input type="text" class="form-control" id="usernumber" name="usernumber" required>
            </div>

            <div class="mb-3">
                <label for="password" class="form-label">密码</label>
                <input type="password" class="form-control" id="password" name="password" required>
            </div>

            <div class="mb-4">
                <label for="usertype" class="form-label">角色</label>
                <select class="form-select" id="usertype" name="usertype">
                    <option value="admin">管理员</option>
                    <option value="volunteer">志愿者</option>
                    <option value="organization">机构</option>
                </select>
            </div>

            <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                <a href="${pageContext.request.contextPath}/users/list" class="btn btn-secondary me-md-2">
                    <i class="bi bi-arrow-left"></i> 返回
                </a>
                <button type="submit" class="btn btn-primary">
                    <i class="bi bi-check-circle"></i> 提交
                </button>
            </div>
        </form>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>